﻿using UnityEngine;

public class MyPointerEventData
{
    public enum Status
    {
        None,
        Drag,
        LongPress,
    }

    public int m_PointerId;

    public TouchPhase m_Phase;
    public Vector2 m_Position; //screenPos
    public Vector2 m_Delta;

    public Status m_Status = Status.None; //public bool m_Dragging;

    //public GameObject m_RawPointerDown; //按下时的raycast对象
    public GameObject m_PointerDown; //OnPointerDown触发对象
    public Vector2 m_DownPosition; //也可以叫m_startPosition

    public GameObject m_PointerDrag; //OnPointerDrag触发对象

    //用于识别双击, 需要保留状态
    public float m_DownTime; //抬起时记录点击时间
    public int m_ClickCount; //用于识别双击
    public GameObject m_LastDown; //OnPointerDown触发对象

    public GameObject m_PointerEnter; //OnPointerEnter触发对象
    public Vector2 m_EnterPosition;

    public MyPointerEventData() { }

    public MyPointerEventData(int pid)
    {
        m_PointerId = pid;
    }

}
